package demo1;

public class LearnClassLoader {

    public static void main(String[] args) {
        //三种类加载器
        Company company1 = new Company();

        ClassLoader classLoader = company1.getClass().getClassLoader();
        ClassLoader parent = classLoader.getParent();
        ClassLoader parent1 = parent.getParent();

        //AppClassLoader应用程序类加载器
        System.out.println(classLoader);
        //ExtClassLoader扩展类加载器 jdk/jre/lib/ext
        System.out.println(parent);
        //引导类加载器是用本地代码编写，不会显示为Java类，所以显示为null
        System.out.println(parent1);
    }
}
